package com.example.demo.service;

import com.example.demo.config.TTSConfig;
import org.springframework.stereotype.Service;

@Service
public class TTSService {

    private final TTSConfig ttsConfig;

    public TTSService(TTSConfig ttsConfig) {
        this.ttsConfig = ttsConfig;
    }

    public void initClient() {
        String apiKey = ttsConfig.getApiKey();
        System.out.println("API Key = " + apiKey);
        // 初始化阿里云实时语音合成客户端
    }

    public String getKey() {
        String apiKey = ttsConfig.getApiKey();
        return apiKey;
        // 初始化阿里云实时语音合成客户端
    }
}

